package com.hgg.controller;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by hgg on 2018/7/18.
 * 消息接收（消费者）
 */
@Component
@RabbitListener(queues = "hgg1")
public class MqReceiver {
    @RabbitHandler
    public void reveiver(String msg){
        System.out.println("hgg1---:"+msg);
    }
}
